package com.baidumap.administrator.happystudy.api;

import android.content.Context;
import android.support.v4.app.Fragment;

import com.ab.http.AbRequestParams;
import com.ab.http.HttpUtil;
import com.baidumap.administrator.happystudy.base.Constant;

import java.io.File;

import static com.ab.view.dialog.StyledDialog.context;

/**
 * 描述：访问网络api
 * 作者：xiaoxing on 17/4/7 20:08
 * 邮箱：2235445233@qq.com
 */
public class Api {


    /**
     * 登陆
     *
     * @param context 上下文
     * @param tel     手机号
     * @param pwd     密码
     */
    public static void login(Context context, String tel, String pwd) {

        AbRequestParams params = new AbRequestParams();
        params.put("user_name", tel);
        params.put("password", pwd);
        HttpUtil.httpClientGetSend(context, params, Constant.LOGIN);
    }

    /**
     * 学生登录
     *
     * @param context   上下文
     * @param school_no 学号
     * @param password  密码
     */
    public static void stuLogin(Context context, String school_no, String password) {

        AbRequestParams params = new AbRequestParams();
        params.put("school_no", school_no);
        params.put("password", password);
        HttpUtil.httpClientGetSend(context, params, Constant.STU_LOGIN);
    }

    /**
     * 发送短信验证码
     *
     * @param context 上下文
     * @param tel     电话号
     */
    public static void sendSms(Context context, String tel) {

        AbRequestParams params = new AbRequestParams();
        params.put("user_name", tel);
        HttpUtil.httpClientGetSend(context, params, Constant.SEND_SMS);
    }

    /**
     * 找回密码发送短信
     *
     * @param context
     * @param tel
     */
    public static void sendCheckCode(Context context, String tel) {

        AbRequestParams params = new AbRequestParams();
        params.put("user_name", tel);
        HttpUtil.httpClientGetSend(context, params, Constant.SENE_CHECK_CODE);
    }

    /**
     * 验证短信
     *
     * @param context 上下文
     * @param tel     手机号
     * @param code    验证码
     */
    public static void verityCode(Context context, String tel, String code) {

        AbRequestParams params = new AbRequestParams();
        params.put("user_name", tel);
        params.put("code", code);
        HttpUtil.httpClientGetSend(context, params, Constant.VERITY_CODE);
    }

    /**
     * 注册
     *
     * @param context 上下文
     * @param tel     手机号
     * @param pwd     密码
     * @param code    验证码
     */
    public static void register(Context context, String tel, String pwd, String code) {

        AbRequestParams params = new AbRequestParams();
        params.put("user_name", tel);
        params.put("password", pwd);
        params.put("type", "2");
        params.put("code", code);
        HttpUtil.httpClientGetSend(context, params, Constant.REGISTER);
    }

    /**
     * 修改密码
     *
     * @param context
     * @param tel
     * @param pwd
     * @param code
     */
    public static void updatePassword(Context context, String tel, String pwd, String code) {

        AbRequestParams params = new AbRequestParams();
        params.put("user_name", tel);
        params.put("password", pwd);
        params.put("code", code);
        HttpUtil.httpClientGetSend(context, params, Constant.UPDATE_PASSWORD);
    }

    /**
     * 主页获取分类
     *
     * @param context
     */
    public static void category(Fragment context) {

        AbRequestParams params = new AbRequestParams();
        HttpUtil.httpClientFragmentGetSend(context, params, Constant.SHOP_CATEGORY);
    }

    /**
     * 满立减10,五折吃大餐,午餐秒杀
     *
     * @param context
     */
    public static void shopActivites(Context context) {

        AbRequestParams params = new AbRequestParams();
        params.put("special_label", 1);
        HttpUtil.httpClientGetSend(context, params, Constant.SHOP_ACTIVITIES);
    }

    /**
     * 店铺列表（超市外卖）
     *
     * @param context 上下文
     * @param page    页码
     * @param cid     分类id
     * @param lat     纬度
     * @param lng     经度
     */
    public static void shopList(Context context, int page, String cid, double lat, double lng) {

        AbRequestParams params = new AbRequestParams();
        params.put("page", page);
        params.put("cid", cid);
        params.put("lat", lat + "");
        params.put("lng", lng + "");
        HttpUtil.httpClientGetSend(context, params, Constant.SHOP_LIST);
    }

    /**
     * 外卖分类商品获取
     *
     * @param context
     * @param type_id
     */
    public static void shopTakeawayCate(Context context, String type_id) {

        AbRequestParams params = new AbRequestParams();
        params.put("type_id", type_id);
        HttpUtil.httpClientGetSend(context, params, Constant.SHOP_TAKEAWAY_CATE);
    }

    /**
     * 店铺主页-店铺信息
     *
     * @param context 上下文
     * @param shop_id 商铺id
     */
    public static void shopDetail(Context context, String shop_id) {

        AbRequestParams params = new AbRequestParams();
        params.put("shop_id", shop_id);
        HttpUtil.httpClientGetSend(context, params, Constant.SHOP_DETAIL);
    }

    /**
     * 店铺主页-分类和商品
     *
     * @param context 上下文
     * @param shop_id 商铺id
     */
    public static void shopProducts(Context context, String shop_id) {

        AbRequestParams params = new AbRequestParams();
        params.put("shop_id", shop_id);
        HttpUtil.httpClientGetSend(context, params, Constant.SHOP_PRODUCTS);
    }

    /**
     * 用户修改密码
     *
     * @param context  上下文
     * @param uid      用户id
     * @param password 密码
     */
    public static void changePassword(Context context, String uid, String password, String user_name, String code) {

        AbRequestParams params = new AbRequestParams();
        params.put("uid", uid);
        params.put("password", password);
        params.put("user_name", user_name);
        params.put("code", code);
        HttpUtil.httpClientPostSend(context, params, Constant.CHANGE_PASSWORD);
    }

    /**
     * 用户信息
     *
     * @param context 上下文
     * @param uid     用户id
     */
    public static void memberInfo(Context context, String uid) {

        AbRequestParams params = new AbRequestParams();
        params.put("uid", uid);
        HttpUtil.httpClientGetSend(context, params, Constant.MEMBER_INFO);
    }

    /**
     * 修改用户信息
     *
     * @param context   上下文
     * @param uid       用户id
     * @param nick_name 昵称
     * @param sex       性别
     */
    public static void updateUserInfo(Context context, String uid, String nick_name, String sex) {

        AbRequestParams params = new AbRequestParams();
        params.put("uid", uid);
        params.put("nick_name", nick_name);
        params.put("sex", sex);
        HttpUtil.httpClientGetSend(context, params, Constant.UPDATE_USERINFO);
    }

    /**
     * 上传头像
     *
     * @param context 上下文
     * @param uid     用户id
     * @param cover   上传的图片
     */
    public static void uploadMemberImage(Context context, String uid, String cover) {

        AbRequestParams params = new AbRequestParams();
        params.put("uid", uid);
        params.put("cover", cover);
        HttpUtil.httpClientGetSend(context, params, Constant.UPLOAD_MEMBER_IMAGE);
    }

    /**
     * 商品详情
     *
     * @param context    上下文
     * @param product_id 商品id
     */
    public static void productDetail(Context context, String product_id) {

        AbRequestParams params = new AbRequestParams();
        params.put("product_id", product_id);
        HttpUtil.httpClientGetSend(context, params, Constant.PRODUCT_DETAIL);
    }

    /**
     * 老师列表
     *
     * @param context 上下文
     * @param orderby （rank:排名（默认）；questions:回答数；income：收入）
     * @param page    页码 设置一页返回20条记录，不足20条则无下一页
     */
    public static void teacherIndex(Context context, String orderby, String page) {

        AbRequestParams params = new AbRequestParams();
        params.put("orderby", orderby);
        params.put("page", page);
        HttpUtil.httpClientGetSend(context, params, Constant.TEACHER_INDEX);
    }

    /**
     * 首页接口数据
     *
     * @param context 上下文
     */
    public static void indexHome(Fragment context) {

        AbRequestParams params = new AbRequestParams();
        HttpUtil.httpClientFragmentGetSend(context, params, Constant.INDEX_HOME);
    }

    /**
     * 添加到购物车
     *
     * @param context      上下文
     * @param access_token token
     * @param uid          用户id
     * @param goods_id     商品id
     * @param goods_num    商品数量
     */
    public static void carAdd(Context context, String access_token, String uid, String goods_id, String goods_num) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("goods_id", goods_id);
        params.put("goods_num", goods_num);
        HttpUtil.httpClientGetSend(context, params, Constant.CART_ADD);
    }

    /**
     * 购物车列表
     *
     * @param context      上下文
     * @param access_token token
     * @param uid          用户id
     */
    public static void carList(Fragment context, String access_token, String uid) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        HttpUtil.httpClientFragmentGetSend(context, params, Constant.CART_LIST);
    }

    /**
     * 购物车商品数量修改
     *
     * @param context      上下文
     * @param access_token token
     * @param cart_id      购物车id
     * @param goods_num    数量
     */
    public static void carupdateNum(Fragment context, String access_token, String cart_id, String goods_num) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("cart_id", cart_id);
        params.put("goods_num", goods_num);
        HttpUtil.httpClientFragmentGetSend(context, params, Constant.CART_UPDATENUM);
    }

    /**
     * 删除购物车
     *
     * @param context      上下文
     * @param access_token token
     * @param cart_id      购物车id
     * @param uid          用户id
     */
    public static void carDel(Fragment context, String access_token, String cart_id, String uid) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("cart_id", cart_id);
        params.put("uid", uid);
        HttpUtil.httpClientFragmentGetSend(context, params, Constant.CART_DEL);
    }

    /**
     * 商品收藏
     *
     * @param context      上下文
     * @param product_id   商品id
     * @param uid          用户id
     * @param access_token token
     */
    public static void productCollect(Context context, String product_id, String uid, String access_token) {

        AbRequestParams params = new AbRequestParams();
        params.put("product_id", product_id);
        params.put("uid", uid);
        params.put("access_token", access_token);
        HttpUtil.httpClientGetSend(context, params, Constant.PRODUCT_COLLECT);
    }

    public static void productCollectCar(Fragment context, String product_id, String uid, String access_token) {

        AbRequestParams params = new AbRequestParams();
        params.put("product_id", product_id);
        params.put("uid", uid);
        params.put("access_token", access_token);
        HttpUtil.httpClientFragmentGetSend(context, params, Constant.PRODUCT_COLLECT);
    }

    /**
     * 老师详情
     *
     * @param context    上下文
     * @param teacher_id 老师id
     */
    public static void teacherDetail(Context context, String teacher_id) {

        AbRequestParams params = new AbRequestParams();
        params.put("teacher_id", teacher_id);
        HttpUtil.httpClientGetSend(context, params, Constant.TEACHER_DETAIL);
    }

    /**
     * 题目列表
     *
     * @param context      上下文
     * @param access_token token
     * @param uid          用户id
     */
    public static void quizLists(Context context, String access_token, String uid) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        HttpUtil.httpClientGetSend(context, params, Constant.QUIZ_LISTS);
    }

    /**
     * 题目详情
     *
     * @param context      上下文
     * @param access_token token
     * @param uid          用户id
     * @param id           题目id
     */
    public static void quizDetail(Context context, String access_token, String uid, String id) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("id", id);
        HttpUtil.httpClientGetSend(context, params, Constant.QUIZ_DETAIL);
    }

    /**
     * 获取科目
     *
     * @param context
     * @param access_token
     */

    public static void quizGetSubject(Context context, String access_token) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        HttpUtil.httpClientGetSend(context, params, Constant.QUIZ_GET_SUBJECT);
    }

    /**
     * 发布题目
     *
     * @param context
     * @param file
     * @param file1
     * @param file2
     * @param access_token
     * @param subject_id
     * @param uid
     * @param title
     * @param content
     */
    public static void quizAdd(Context context, File file, File file1, File file2, String access_token, String subject_id, String uid, String title, String content) {

        AbRequestParams params = new AbRequestParams();
        params.put("file", file);
        params.put("file1", file1);
        params.put("file2", file2);
        params.put("access_token", access_token);
        params.put("subject_id", subject_id);
        params.put("uid", uid);
        params.put("title", title);
        params.put("content", content);
        HttpUtil.httpClientPostSend(context, params, Constant.QUIZ_ADD);
    }

    /**
     * 提交订单
     *
     * @param context
     * @param access_token
     * @param uid
     * @param cart_id
     * @param address_id
     * @param payment
     * @param delivery_time
     * @param shipping_type
     */
    public static void orderConfirmOrder(Context context, String access_token, String uid, String cart_id, String address_id, String payment, String delivery_time, String shipping_type) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("cart_id", cart_id);
        params.put("address_id", address_id);
        params.put("payment", payment);
        params.put("delivery_time", delivery_time);
        params.put("shipping_type", shipping_type);
        HttpUtil.httpClientGetSend(context, params, Constant.ORDER_CONFIRMORDER);
    }

    /**
     * 立即购买
     *
     * @param context
     * @param access_token
     * @param uid
     * @param goods_id
     * @param address_id
     * @param payment
     * @param delivery_time
     * @param shipping_type
     */
    public static void orderConfirmOrderNow(Context context, String access_token, String uid, String goods_id, String address_id, String payment, String delivery_time, String shipping_type) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("goods_id", goods_id);
        params.put("address_id", address_id);
        params.put("payment", payment);
        params.put("delivery_time", delivery_time);
        params.put("shipping_type", shipping_type);
        HttpUtil.httpClientGetSend(context, params, Constant.ORDER_CONFIRM_ORDERNOW);
    }


    /**
     * 收货地址
     *
     * @param context
     * @param access_token
     * @param uid
     */
    public static void addressGet(Context context, String access_token, String uid) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        HttpUtil.httpClientGetSend(context, params, Constant.ADDRESS_GET);
    }

    /**
     * 添加地址
     *
     * @param context            上下文
     * @param access_token       token
     * @param uid                用户id
     * @param accept_name        收货人姓名
     * @param zip                邮编
     * @param telephone          手机号码
     * @param address            省市区地址
     * @param street             街道名称
     * @param detail             详细地址
     * @param is_default_address 是否默认地址 1默认 0不是
     */
    public static void addressSet(Context context, String access_token, String uid, String accept_name, String zip, String telephone, String address, String street, String detail, String is_default_address) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("accept_name", accept_name);
        params.put("zip", zip);
        params.put("telephone", telephone);
        params.put("address", address);
        params.put("street", street);
        params.put("detail", detail);
        params.put("is_default_address", is_default_address);
        HttpUtil.httpClientGetSend(context, params, Constant.ADDRESS_SET);
    }

    /**
     * 修改地址
     *
     * @param context            上下文
     * @param access_token       token
     * @param uid                用户id
     * @param accept_name        收货人姓名
     * @param zip                邮编
     * @param telephone          手机号码
     * @param address            省市区地址
     * @param street             街道名称
     * @param detail             详细地址
     * @param is_default_address 是否默认地址 1默认 0不是
     */
    public static void addressUpdate(Context context, String access_token, String uid, String accept_name, String zip, String telephone, String address, String street, String detail, String is_default_address, String id) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("accept_name", accept_name);
        params.put("zip", zip);
        params.put("telephone", telephone);
        params.put("address", address);
        params.put("street", street);
        params.put("detail", detail);
        params.put("is_default_address", is_default_address);
        params.put("address_id", id);
        HttpUtil.httpClientGetSend(context, params, Constant.ADDRESS_UPDATE);
    }

    /**
     * 删除地址
     *
     * @param context      上下文
     * @param access_token token
     * @param address_id   地址id
     */
    public static void addressDel(Context context, String access_token, String address_id) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("address_id", address_id);
        HttpUtil.httpClientGetSend(context, params, Constant.ADDRESS_DEL);
    }

    /**
     * 获取默认的
     *
     * @param context      上下文
     * @param access_token token
     * @param uid          用户id
     */
    public static void addressGetDefault(Context context, String access_token, String uid) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        HttpUtil.httpClientGetSend(context, params, Constant.ADDRESS_GETDEFAULT);
    }

    /**
     * 修改默认地址
     *
     * @param context      上下文
     * @param access_token token
     * @param uid          用户id
     * @param address_id   地址id
     */
    public static void addressSetDefault(Context context, String access_token, String uid, String address_id) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("address_id", address_id);
        HttpUtil.httpClientGetSend(context, params, Constant.ADDRESS_SETDEFAULT);
    }

    /**
     * 用户信息
     *
     * @param context 上下文
     * @param uid     用户id
     */
    public static void userMemberInfo(Context context, String uid) {

        AbRequestParams params = new AbRequestParams();
        params.put("uid", uid);
        HttpUtil.httpClientGetSend(context, params, Constant.USER_MEMBER_INFO);
    }


    /**
     * 修改用户的信息
     *
     * @param context   上下文
     * @param uid       用户id
     * @param nick_name 昵称
     * @param sex       性别
     * @param school    学校
     * @param section   学院
     * @param grade     年级
     * @param class1    班级
     */
    public static void updateMemberInfo(Context context, String uid, String nick_name, String sex, String school, String section, String grade, String class1) {

        AbRequestParams params = new AbRequestParams();
        params.put("uid", uid);
        params.put("nick_name", nick_name);
        params.put("sex", sex);
        params.put("school", school);
        params.put("section", section);
        params.put("grade", grade);
        params.put("class", class1);
        HttpUtil.httpClientGetSend(context, params, Constant.USER_UPDATE_USER_INFO);
    }

    /**
     * 上传用户头像
     *
     * @param context 上下文
     * @param uid     用户id
     * @param cover   头像
     */
    public static void userMemberImage(Context context, String uid, File cover) {

        AbRequestParams params = new AbRequestParams();
        params.put("uid", uid);
        params.put("cover", cover);
        HttpUtil.httpClientPostSend(context, params, Constant.UPLOAD_MEMBER_IMAGE);
    }

    /**
     * 确定订单
     *
     * @param cntext
     * @param access_token
     * @param uid
     * @param cart_id
     * @param lat
     * @param lng
     */
    public static void seterOrder(Context cntext, String access_token, String uid, String cart_id, String lat, String lng) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("cart_id", cart_id);
        params.put("lat", lat);
        params.put("lng", lng);
        HttpUtil.httpClientGetSend(context, params, Constant.ORDER_SET_ORDER);
    }

    /**
     * 订单列表
     *
     * @param context
     * @param access_token
     * @param uid
     * @param status       0 未支付 1已支付 2已发货 3 收货  4已评价 5已完成 6 已取消
     */
    public static void orderLists(Fragment context, String access_token, String uid, String status) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("status", status);
        HttpUtil.httpClientFragmentGetSend(context, params, Constant.ORDER_GET_LISTS);
    }

    /**
     * 订单退货售后提交
     *
     * @param context
     * @param access_token
     * @param uid
     * @param product_id
     * @param shop_id
     * @param order_id
     * @param title
     * @param content
     */
    public static void orderFeedbackSubmit(Context context, String access_token, String uid, String product_id, String shop_id, String order_id, String title, String content) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("product_id", product_id);
        params.put("shop_id", shop_id);
        params.put("order_id", order_id);
        params.put("title", title);
        params.put("content", content);
        HttpUtil.httpClientGetSend(context, params, Constant.ORDER_FEEDBACK_SUBMIT);
    }

    /**
     * 订单列表
     *
     * @param context
     * @param access_token
     * @param uid
     * @param status       0 未支付 1已支付 2已发货 3 收货  4已评价 5已完成 6 已取消
     */
    public static void orderLists(Context context, String access_token, String uid, String status) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("status", status);
        HttpUtil.httpClientGetSend(context, params, Constant.ORDER_GET_LISTS);
    }

    /**
     * 评论
     *
     * @param context
     * @param uid
     * @param order_id
     * @param product_id
     * @param description_score
     * @param shipping_score
     * @param service_score
     * @param is_anomymous
     * @param content
     */
    public static void orderComment(Context context, String access_token, String uid, String order_id, String product_id, String description_score, String shipping_score, String service_score, String is_anomymous, String content) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("order_id", order_id);
        params.put("product_id", product_id);
        params.put("description_score", description_score);
        params.put("shipping_score", shipping_score);
        params.put("service_score", service_score);
        params.put("is_anomymous", is_anomymous);
        params.put("content", content);
        HttpUtil.httpClientGetSend(context, params, Constant.ORDER_COMMENT);
    }

    /**
     * 确认收货
     *
     * @param context
     * @param access_token
     * @param uid
     * @param order_id
     */
    public static void orderAffirm(Context context, String access_token, String uid, String order_id) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("order_id", order_id);
        HttpUtil.httpClientGetSend(context, params, Constant.ORDER_AFFIRM);
    }

    /**
     * 删除订单
     *
     * @param context
     * @param access_token
     * @param uid
     * @param order_id
     */
    public static void orderDel(Fragment context, String access_token, String uid, String order_id) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("order_id", order_id);
        HttpUtil.httpClientFragmentGetSend(context, params, Constant.ORDER_DEL);
    }

    /**
     * 订单详情
     *
     * @param context
     * @param access_token
     * @param uid
     * @param id           订单id
     */
    public static void orderDetail(Context context, String access_token, String uid, String id) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        params.put("id", id);
        HttpUtil.httpClientGetSend(context, params, Constant.ORDER_DETAIL);
    }

    /**
     * 首页分类
     *
     * @param context
     */
    public static void indexCategory(Fragment context) {

        AbRequestParams params = new AbRequestParams();
        HttpUtil.httpClientFragmentGetSend(context, params, Constant.INDEX_CATEGORY);
    }

    /**
     * 首页分类商品
     *
     * @param context
     * @param type_id
     */
    public static void indexCategoryroducts(Fragment context, String type_id) {

        AbRequestParams params = new AbRequestParams();
        params.put("type_id", type_id);
        HttpUtil.httpClientFragmentGetSend(context, params, Constant.INDEX_PRODUCTS);
    }

    /**
     * 添加课程
     *
     * @param context
     * @param access_token
     * @param mondey
     * @param tuesday
     * @param wenseday
     * @param thursday
     * @param friday
     * @param uid
     */
    public static void courseAdd(Context context, String access_token, String mondey, String tuesday, String wenseday, String thursday, String friday, String uid) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("mondey", mondey);
        params.put("tuesday", tuesday);
        params.put("wenseday", wenseday);
        params.put("thursday", thursday);
        params.put("friday", friday);
        params.put("uid", uid);
        HttpUtil.httpClientPostSend(context, params, Constant.COURSE_ADD);
    }

    /**
     * 课程列表
     *
     * @param context
     * @param access_token
     * @param uid
     */
    public static void courseLists(Context context, String access_token, String uid) {

        AbRequestParams params = new AbRequestParams();
        params.put("access_token", access_token);
        params.put("uid", uid);
        HttpUtil.httpClientGetSend(context, params, Constant.COURSE_LISTS);
    }

    /**
     * 搜索
     *
     * @param context
     * @param product_name
     */
    public static void productSearch(Context context, String product_name) {

        AbRequestParams params = new AbRequestParams();
        params.put("product_name", product_name);
        HttpUtil.httpClientGetSend(context, params, Constant.PRODUCT_SEARCH);
    }


}
